<html>
<head>
<title>postfile</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
	body,input{font-size:9pt}
	body,form{margin:0;padding:0}
</style>
<script>
	checkfile = function(){
		if(document.getElementById("cfiles").value == ""){
			alert("请上传照片路径");
			return false;
		}
		var f = document.getElementById("cfiles").value + "";
		f = f.toLowerCase();
			return true;
	}
</script>
</head>
<body>
<form name="frm" method="post" action="postfile.jsp" ENCTYPE="multipart/form-data" onsubmit="return checkfile();">
	选择头像 
	<input type="file" name="files" size="10" id="cfiles" onchange="checkfile()" />
	<input type="submit" name="submit" id="btnsubmit" value="上传">
</form>
</body>
</html>